package com.zfh.cloud.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zfh.cloud.apis.OrderFeignClient;
import com.zfh.cloud.pojo.Order;
import com.zfh.cloud.pojo.User;
import com.zfh.cloud.service.UserService;
import com.zfh.cloud.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 小可乐
* @description 针对表【t_user】的数据库操作Service实现
* @createDate 2024-09-14 13:28:05
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{

    @Autowired
    private UserMapper userMapper;
    @Autowired
    private OrderFeignClient orderFeignClient;
    /**
     * 根据user表查询order表
     * 根据userid查询order数据
     * @param userId
     */
    @Override
    public Order findOrderByUserId(Long userId) {
        Order order = orderFeignClient.findOrderByUserId(userId);
        return order;
    }
}




